<div class="xns">
<div class="xf" id="xrs">
<a href="/" class="xls" id="xcow"></a>
<div id="xfs" style="display:none"></div>
<ul class="xes">
<li class="xds" id="xbs"><a class="xcs xas" href="/people/{{user.get('pinyin')}}"><img class="xzs" src="http://p4.zhimg.com/66/6b/666b0abfc_s.jpg"><span class="xys">{{user.get('name')}}</span></a></li>
<li class="xds"><a class="xcs xxr" href="/people/{{user.get('pinyin')}}">我的主页</a></li>
<li class="xds"><a class="xcs xwr" href="/inbox">私信 <span id="xkaw" class="xcv xz" style="visibility:hidden;"></span></a></li>
<li class="xds"><a class="xcs xvr" href="/settings">设置</a></li>
<li class="xds"><a class="xcs xur" href="/logout">退出</a></li>
</ul>

<div id="xtk" class="xks">
<div class="xgs"><a onclick="javascript:$('#question').show();" href="#">添加问题</a></div>
<div class="xis">
<input type="text" class="xhs" name="q" autocomplete="off" value="" 
aria-haspopup="true" id="search_text" onpropertychange="auto_search()" oninput="auto_search()">
<div class="xlr xc" style="display: none; ">
<div class="xjr"></div>
<div class="xir">提示：提问前请先搜索问题，查看是否已经有人问过了</div>
</div>
<label class="xhr">搜索话题、问题或人…</label>
</div>
<form style="display:none" method="GET" action="/search" id="xtk-form" class="xis">
</form>

<div style="-moz-user-select: none; display: none;" class="ac-renderer" role="listbox" id="search_box">
<div class="ac-row ac-active" id=":1" role="option" style="-moz-user-select: none;">
<a href="javascript:void(0);" class="xsk" style="-moz-user-select: none;">
<b class="ac-highlighted" style="-moz-user-select: none;">AA</b></a>
<span class="xdr" style="-moz-user-select: none;"></span>
</div>
<div class="ac-row" id=":1" role="option" style="-moz-user-select: none;">
<a href="javascript:void(0);" class="xsk" style="-moz-user-select: none;">
<b class="ac-highlighted" style="-moz-user-select: none;">AA</b></a>
<span class="xdr" style="-moz-user-select: none;"></span>
</div>
<div class="ac-row" id=":1" role="option" style="-moz-user-select: none;">
<a href="javascript:void(0);" class="xsk" style="-moz-user-select: none;">
<b class="ac-highlighted" style="-moz-user-select: none;">AA</b></a>
<span class="xdr" style="-moz-user-select: none;"></span>
</div>
<div class="ac-row" id=":w" role="option" style="-moz-user-select: none;">
<a href="javascript:void(0);" class="xqk" style="-moz-user-select: none;">国内有智能手机的
<b class="ac-highlighted" style="-moz-user-select: none;">AA</b>付款应用吗？</a>
<span class="xdr" style="-moz-user-select: none;">2 个答案</span>
</div>
</div>

<div class="modal-dialog" tabindex="0" role="dialog" aria-labelledby=":0" style="left: 100.5px; top: 66.4px; display: none;" id="question">
<div class="modal-dialog-title modal-dialog-title-draggable" id="question_head">
<span class="modal-dialog-title-text">添加问题</span>
<span class="modal-dialog-title-close"></span>
</div>
<div class="modal-dialog-content">
<div id="xyr">
<div class="xun xcr xc add-question-guide" style="display:none">
<p>知乎禁止求职招聘、寻人寻物等类型的内容，详情可参看 <a href="http://www.zhihu.com/question/19806261" target="_blank">知乎提问规范有哪些？</a></p>
</div>
<div class="xun">
<div id="xdew"></div>
<div style="position: relative; display: none; " id="xvq">
<div class="xil xbr xc">问题字数太少了吧</div>
<a name="close" title="关闭" href="javascript:$('#xvq').hide();" class="xmq">x</a>
<span class="xzr"></span>
</div>

<div class="xsj">
<textarea class="xrm xvk" title="在这里输入问题" id="xjfw" aria-haspopup="true" style="height: 48px; " name="title" onfocus="javascript:$('#xvq').hide();"></textarea>
</div>
<div id="xer" style="position: absolute;"></div>
</div>
<div class="xun">
<div id="xoq" class="xcr xc goog-zippy-collapsed" tabindex="0">
<span class="xar"></span>
<span class="xuq"></span>
<span class="xxq">问题补充 <span class="xwq">可选</span></span>
</div>
<div style="display: none;position: relative;" class="xvq">
<div class="xil xbr xc"></div>
<a name="close" title="关闭" href="javascript:;" class="xmq">x</a>
<span class="xzr"></span>
</div>
<div style="display: none; " id="xbew" class="xsj">
<textarea class="xrm label-input-label xvk" name="detail" id="detail"></textarea>
</div>
</div>

<div style="position: relative; display: none; " id="xvq_topic" class="xvq">
<div class="xil xbr xc">话题不可为空，逗号分隔</div>
<a name="close" title="关闭" href="javascript:$('#xvq_topic').hide();" class="xmq">x</a>
<span class="xzr"></span>
</div>

<div id="xnq" class="xzc xcr xc goog-zippy-collapsed" tabindex="0">
<span class="xar"></span>
<span class="xuq"></span>
<span class="xxq">添加话题</span>
</div>
<div style="display:none;" id="xsq" class="xmd xu">
<div class="xej" style="display: none; "></div>
<div class="xrq xe">
<div class="xsu">
</div>
<div class="xjw"><input class="xlq" aria-haspopup="true" name="topic" id="topic" onfocus="javascript:$('#xvq_topic').hide();"><a class="xvw xow" href="javascript:;" name="add" style="display: none; ">添加</a><a href="javascript:;" name="close" style="display: none; ">完成</a></div></div><div id="xpq"></div>
<div id="xqq"></div>
</div>
<div class="xkw">
<label class="xjw xzc">
<input type="checkbox" value="1" class="xcew">匿名添加问题
</label>
<a href="javascript:$('#question').hide();" name="cancel" class="xav">取消</a>
<a href="javascript:add_question();" name="addq" class="xz xqnw xlw">添加问题</a>
<a href="" name="jumpq" class="xc xow xeew" style="display: none; ">查看问题</a>
</div>
</div>
</div>
<div class="modal-dialog-buttons"></div><span tabindex="0"></span></div>

<script type="text/javascript"><!--

	function auto_search()
	{
		if ($('#search_text').val() != '')
		{
			$('#search_box').show();
		}
		else
		{
			$('#search_box').hide();
		}
	}
	
	function add_question()
	{
		var content = $.trim($('#xjfw').val());
		if (content.length < 6)
		{
			$('#xvq').show();
			return;
		}
		var topic = $.trim($('#topic').val());
		if (topic == '')
		{
			$('#xvq_topic').show();
			return;
		}
		var detail = $.trim($('#detail').val());
		
		$.ajax({
		  type: "POST",
		  url: "/question",
		  data: "title="+content+"&detail="+detail+"&topic="+topic,
		  success: function(msg){
		     //$('#xdjw').html(msg);
		     //$('#xdjw').show();
		     if (msg == '添加成功')
		     {
		     	$('#xjfw').val('');
		     	$('#topic').val('');
		     	$('#detail').val('');
		     }
		     $('#question').hide();
		   },
		   error: function(msg)
		   {
		   	 $('#question').hide();
		   	 //$('#xdjw').html('调用出错');
		     //$('#xdjw').show();
		   }
		}); 
	}
	
	$('#search_text').bind('focus', function ()
	{
		$('#xtk .xhr').hide();
		$('#xtk .xjr').hide();
		$('#xtk .xir').hide();
		$('#xtk .xlr').css('padding', '0');
		$('#xtk .xlr').css('border', '0');
		if ($(this).val() != '')
		{
			$('#search_box').show();
		}
	});
	$('#xtk .xhr').bind('click', function ()
	{
		$('#search_text').focus();
	});
	$("#search_text").blur(function () 
	{ 
		if ($(this).val() == '')
		{
			$('#xtk .xhr').show();
		} 
		$('#search_box').hide();
	}); 
	
	$('#search_box .ac-row').bind('mouseover', function ()
	{
		$(this).addClass('ac-active');
	});
	
	$('#search_box .ac-row').bind('mouseout', function ()
	{
		$(this).removeClass('ac-active');
	});
	
	$('#xoq').toggle(function ()
	{
		$('#xbew').show();
		$(this).removeClass('goog-zippy-collapsed');
		$(this).addClass('goog-zippy-expanded');
	}, function ()
	{
		$('#xbew').hide();
		$(this).removeClass('goog-zippy-expanded');
		$(this).addClass('goog-zippy-collapsed');
	});
	
	$('#xnq').toggle(function ()
	{
		$('#xsq').show();
		$(this).removeClass('goog-zippy-collapsed');
		$(this).addClass('goog-zippy-expanded');
	}, function ()
	{
		$('#xsq').hide();
		$(this).removeClass('goog-zippy-expanded');
		$(this).addClass('goog-zippy-collapsed');
	});
	
	var Drag={
	'c':false,
	'e':function(e){
	    if (!e) e = window.event;return e;
	},
	'move':function(v){
	    if(typeof v != 'object' || !v.obj) return false;
	    var h = v.handle?v.handle:v.obj,o = v.obj,x,y,k = this;
	    h.onmousedown = function(e){
	      k.c = true;
	      with(o){
	        style.position = "absolute";
	        var _a = offsetLeft,_b = offsetTop;
	        x = k.e(e).clientX;
	        y = k.e(e).clientY;
	        document.onmousemove = function(e){
	          if(!k.c) return false;
	          with(this){
	            style.left = _a + k.e(e).clientX - x + "px";
	            style.top = _b + k.e(e).clientY - y + "px";
	          }
	        }
	      }
	      document.onmouseup = new Function("Drag.c=false");
	    }
	}
	}
	
	Drag.move({
        'obj':document.getElementById("question"),//拖动的主体
        'handle':document.getElementById("question_head")//拖动的把柄
     });
-->
</script>

</div>

<div id="zg-top-nav" class="xtr">
<ul class="xrr">

<li class="xqr" id="zh-top-home-link">
<a class="xpr" href="/" id="xbow">首页</a>
</li>
<li class="xqr" id="zh-top-nav-item-domain">
<a class="xpr" href="/class">领域</a>
</li>
<li class="xqr">
<a id="xhaw" class="xpr" href="/notifications">通知<span id="xmaw" class="xor xz" style="display: none; " href="javascript:void(0);">0</span></a>
</li>



</ul>
<div class="xsr xc" id="xgp" style="display: none; ">
<div class="xmr xc">
<div class="xkr">&nbsp;</div>
<ul class="xep"></ul>
<a href="/notifications" id="xlaw" class="xow xvv" style="font-size:12px">查看所有</a>
<a href="javascript:;" class="xmw xd" id="xss">
知道了
</a>
</div>
</div>
</div>



</div>
</div>